<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateActivityInstanceTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('activity_instance', function (Blueprint $table) {
            $table->bigInteger('id', true);
            $table->timestamp('created_at', 6)->nullable();
            $table->bigInteger('creator_id')->nullable();
            $table->timestamp('updated_at', 6)->nullable();
            $table->bigInteger('updater_id')->nullable();
            $table->bigInteger('activity_id')->nullable();
            $table->string('biz_status', 255)->nullable();
            $table->string('biz_type', 255)->nullable();
            $table->longText('extend_data')->nullable();
            $table->bigInteger('flow_define_id')->nullable();
            $table->bigInteger('flow_instance_id')->nullable();
            $table->string('name', 255)->nullable();
            $table->string('phase_name', 255)->nullable();
            $table->integer('result')->nullable();
            $table->integer('status')->nullable();
            $table->string('type', 255)->nullable();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('activity_instance');
    }
};
